home *** CD-ROM | disk | FTP | other *** search
- function onEnterFrame()
- {
- if(this.hitTest(_parent._parent._parent.STAGE))
- {
- touchBuffer++;
- if(this.hitTest(_parent._parent.HERO.feet) and pressed == false and touchBuffer > 30)
- {
- pressed = true;
- _parent._parent.HERO.drop = -15;
- touchBuffer = 0;
- _parent._parent._parent.STAGE.newSound("Sound_Switch");
- if(switchStatus == false)
- {
- switchStatus = true;
- }
- else
- {
- switchStatus = false;
- }
- }
- else if(this.hitTest(_parent._parent.HERO.feet) == false and touchBuffer > 30)
- {
- pressed = false;
- }
- if(switchStatus == true)
- {
- if(this._rotation < 180)
- {
- this._rotation += 20;
- }
- }
- else if(this._rotation > 0)
- {
- this._rotation -= 20;
- }
- }
- }
- pressed = false;
- switchStatus = false;
- touchBuffer = 0;
-